#include <iostream>
#include <unordered_set>
using namespace std;
using ll=long long;


unordered_set<ll> has;
int n;
ll x;
ll a[40];
void dfs1(int cur,int edg,ll sum)
{
	has.insert(sum);
	if(cur>edg)
		return;
	dfs1(cur+1,edg,sum+a[cur]);
	dfs1(cur+1,edg,sum);
	
}
bool dfs2(int cur,int edg,ll sum)
{
	if(has.count(x-sum))
		return true;
	if(cur>edg)
		return false;
	if(dfs2(cur+1,edg,sum+a[cur]))
		return true;
	if(dfs2(cur+1,edg,sum))
		return true;
	return false;
}
int main()
{
	cin>>n>>x;
	for(int i=1;i<=n;i++)
		cin>>a[i];
		
	int mid=n/2;
	dfs1(1,mid,0);
	if(dfs2(mid+1,n,0))
	{
		cout<<'Y'<<endl;
	}
	else{
		cout<<'N'<<endl;
	}
	
		
	return 0;
}
